package com.atguigu.juc.study.chapter03.cf.mall;

import java.util.concurrent.CompletableFuture;

/**
 * @author : leimingchao
 * @date Date : 2022年06月11日 20:39
 */
public class CompletableFutureMallDemo2 {

    public static void main(String[] args) {

        CompletableFuture<String> completableFuture = CompletableFuture.supplyAsync(() -> "hello 1234");

        //join():阻塞，没有抛出异常
        System.out.println(completableFuture.join());
    }
}
